package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;

import cn.lg.soar.database.base.entity.BaseEntity;

/**
 * 表单收集
 * @author ZhuanZ（无密码）
 * @since 2025-01-09
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "FormCollect", description = "表单收集")
@TableName("fc_form_collect")
public class FormCollect extends BaseEntity {

    /** 表单收集ID */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId
    private Long id;

    /** 表单名称 */
    @NotBlank(message = "表单名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "表单名称")
    @ApiModelProperty(value = "表单名称")
    private String collectName;

    /** 可见范围 */
    @ExcelProperty(value = "可见范围")
    @ApiModelProperty(value = "可见范围")
    private String visibleRange;

    /** 是否失效(0-否 1-是) */
    @NotNull(message = "是否失效(0-否 1-是)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "是否失效(0-否 1-是)")
    @ApiModelProperty(value = "是否失效(0-否 1-是)")
    private Integer isInvalid;

    /** 是否需要审核(0-否 1-是) */
    @NotNull(message = "是否需要审核(0-否 1-是)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "是否需要审核(0-否 1-是)")
    @ApiModelProperty(value = "是否需要审核(0-否 1-是)")
    private Integer isAuditing;

    /** 开始时间 */
    @NotNull(message = "开始时间不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "开始时间")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startDate;

    /** 结束时间 */
    @NotNull(message = "结束时间不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "结束时间")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endDate;

    /** 排序 */
    @NotNull(message = "排序不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "排序")
    @ApiModelProperty(value = "排序")
    private Integer orders;

    /** 状态 */
    @ExcelProperty(value = "状态")
    @ApiModelProperty(value = "状态")
    private String status;

    /** 扩展字段1 */
    @ExcelProperty(value = "扩展字段1")
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ExcelProperty(value = "扩展字段2")
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ExcelProperty(value = "扩展字段3")
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    /** 乐观锁 */
    @NotNull(message = "乐观锁不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "乐观锁")
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
